<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="h" uri="/WEB-INF/config/tag/feonix-tags.tld"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>系统安装界面</title>
<h:head message="true" validity="true" cookie="true" placeholder="true"
	bootstrap="true"></h:head>
<h:import type="css" path="/resources/setup/css/animate.css"></h:import>
<h:import type="css" path="/resources/setup/css/style.css"></h:import>
<h:import type="js" path="/resources/setup/js/jquery.waypoints.min.js"></h:import>
<h:import type="js" path="/resources/setup/js/main.js"></h:import>
<script type="text/javascript">
	$.validity.setup({
		outputMode : "showErr"
	});
	window.confirm = function(msg, okCall, cancelCall) {
		top.$.messager.confirm(' ', msg, function(flag) {
			if (flag) {
				if (typeof (okCall) != 'undefined') {
					okCall();
				}
			} else {
				if (typeof (cancelCall) != 'undefined') {
					cancelCall();
				}
			}
		});
	};
	$(function() {
		$('#loginform').validity(function() {
			$('#username').require('请填写用户名');
			$('#password').require('请填写密码');
			$('#randcode').require('请填写验证码');
		}, {
			beforeSubmit : function(validateResult) {
				
			},
			success : function(result) {
				if (result.success) {
					top.location.href = 'main/index';
				} else {
					$('#verifyImg').click();
					alert(result.message);
				}
			}
		});
		window.alert = function(msg, type, fu) {
			top.$.messager.alert(' ', msg, type, fu);
		};
	});
	function useridfocus() {
		//默认焦点在用户名上
		$('#userid').focus();
		//如果用户名有值，则默认到密码上
		if ($('#userid').val().length > 0) {
			$('#userpassword').focus();
		}
	}
</script>
<style>
#verifyImg {
	vertical-align: middle;
	line-height: 50px;
}
</style>
</head>
<body class="style-3">
	<div class="container">
		<div class="row">
			<div class="col-md-12 text-center">
				<ul class="menu">
				</ul>
			</div>
		</div>
		<div class="row">
			<div class="col-md-4 col-md-push-8">


				<!-- Start Sign In Form -->
				<form action="${url }" class="fh5co-form animate-box" method="post"
					data-animate-effect="fadeInRight" id="loginform">
					<h2>登录</h2>
					<div class="form-group">
						<label for="username" class="sr-only">登录名</label> <input
							type="text" class="form-control" id="username" name="username"
							placeholder="登录名" autocomplete="off" value="${username}">
					</div>
					<div class="form-group">
						<label for="password" class="sr-only">密　码</label> <input
							type="password" class="form-control" id="password" name="password"
							placeholder="密码" autocomplete="off">
					</div>
					<div class="form-group">
						<label for="randcode" class="sr-only">密　码</label> 
						<input type="text" class="form-control" id="randcode" name="randcode"
							placeholder="验证码" autocomplete="off" style="width: 60%;">
							<h:verifycode url="verifyCode.do" width="110" height="50"></h:verifycode>
					</div>
					<div class="form-group">
						<input type="submit" value="登 录" class="btn btn-primary" style="width: 80px;">
					</div>
				</form>
				<!-- END Sign In Form -->
			</div>
		</div>
	</div>
	<div id="manager-btn">
		<a href="../login.do">控制面板</a>
	</div>
</body>

</html>